using System;
using System.Collections.Generic;
using System.Text;
using System.Data;



namespace THSLib
{
    #region THSDataSetRelationController
    /// <summary>
    /// This object represents the properties and methods of a THSDataSetRelation.
    /// </summary>
    public class STTHSDataSetRelationsController:BaseBusinessController
    {
        #region SP Name        
        //Select By ForeignKey Queries
        private readonly string spGetSTTHSDataSetRelationsBySTTHSDataSetID = "STTHSDataSetRelations_SelectBySTTHSDataSetID";
        private readonly string spGetSTTHSDataSetRelationsBySTTHSDataSetIDAndSTTHSDataSetRelationName =
                               "STTHSDataSetRelations_SelectBySTTHSDataSetIDAndSTTHSDataSetRelationName";


        //Delete by foreignkey Queries
        /*Remove cause of not use
        private readonly string spDeleteSTTHSDataSetRelationsBySTTHSDataSetID = "STTHSDataSetRelations_DeleteBySTTHSDataSetID";*/

        #endregion

        public STTHSDataSetRelationsController()
        {
            //dal = new STTHSDataSetRelationsDAL();
            dal = new DALBaseProvider("STTHSDataSetRelations", typeof(STTHSDataSetRelationsInfo));
        }       
        

        public DataSet GetTHSDataSetRelationByTHSDataSetID(int iTHSDataSetID)
        {
            return (DataSet)dal.GetDataSet(spGetSTTHSDataSetRelationsBySTTHSDataSetID,
                                           iTHSDataSetID);            
        }

        public STTHSDataSetRelationsInfo GetTHSDataSetRelationByTHSDataSetIDAndTHSDataSetRelationName(int iTHSDataSetID, String strTHSDataSetRelationName)
        {
            return (STTHSDataSetRelationsInfo)dal.GetDataObject(spGetSTTHSDataSetRelationsBySTTHSDataSetIDAndSTTHSDataSetRelationName,
                                                                  iTHSDataSetID, strTHSDataSetRelationName);           
        }        
    }
    #endregion
}
